]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Destroy GjsContext before exit
authorPhilip Chimento <philip@endlessm.com>
Fri, 10 Feb 2017 02:09:21 +0000 (18:09 -0800)
committerPhilip Chimento <philip.chimento@gmail.com>
Fri, 10 Feb 2017 21:19:01 +0000 (13:19 -0800)
Here are a few places where I missed it before: the GjsContext must be
unrefed before exiting, or it will crash on exit.

https://bugzilla.gnome.org/show_bug.cgi?id=778425

src/gnome-shell-plugin.c
src/main.c

index ab5ebec6ece8d14ff4977d663d09505981f3e36c..35b9995ea06a5554a921e7d4211d66683f656592 100644 (file)
@@ -239,6 +239,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
        * If there was a generic "hook into bug-buddy for non-C crashes"
        * infrastructure, here would be the place to put it.
        */
+      g_object_unref (gjs_context);
       exit (1);
     }
 }
index c88f04642b27430075c37a89761441ba28ce070e..dbf0e3bd790fd32b388935f6cabd434875154ffe 100644 (file)
@@ -360,6 +360,7 @@ list_modes (const char  *option_name,
   if (!gjs_context_eval (context, script, -1, "<main>", &status, NULL))
       g_message ("Retrieving list of available modes failed.");
 
+  g_object_unref (context);
   exit (status);
 }